<?php
/**
 * Data model
 *
 * @category  DataModel
 * @package   DataModel
 * @author    DataModel Generator v1.3
 * @version   Revision: $Rev$
 */
/**
 * Data model for table "phpclass"
 *
 * @category  DataModel
 * @package   DataModel
 * @author    DataModel Generator v1.3
 * @version   Revision: $Rev$
 *
 * @property-read mixed Id
 * @property-read mixed Name
 * @property-read mixed Extends
 * @property-read mixed Implements
 * @property-read mixed StartNumber
 * @property-read mixed EndNumber
 * @property-read mixed IsAbstract
 * @property-read mixed DoctypeId
 * @property-read mixed IsInterface
 * @property-read mixed FileId
 */
abstract class BasePhpclass extends BaseRecord
{
    const TABLE_NAME = "phpclass";

    public function __construct()
    {
        parent::__construct(self::TABLE_NAME);
    }

    protected function initFields()
    {
        $this->hasColumn('id', 'PA:int(3)');
        $this->hasColumn('name', 'N:varchar(255)');
        $this->hasColumn('extends', 'N:varchar(255)');
        $this->hasColumn('implements', 'N:varchar(255)');
        $this->hasColumn('start_number', 'int(3)');
        $this->hasColumn('end_number', 'int(3)');
        $this->hasColumn('is_abstract', 'tinyint(1)|0');
        $this->hasColumn('doctype_id', 'int(3)');
        $this->hasColumn('is_interface', 'tinyint(1)|0');
        $this->hasColumn('file_id', 'int(3)');
    }

    public function initRelations()
    {
    }

    public function getById($id)
    {
        return parent::getById($id, 'Phpclass');
    }

    public function getByParams( $params, $type = ORMRecord::ONE_RECORD, $limit = null )
    {
        return parent::getByParams( $params, $type, $limit, 'Phpclass');
    }

    public function getAll( $limit = null )
    {
        return parent::getAll( $limit, 'Phpclass' );
    }
}